.container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  container-name: artifact;
  container-type: inline-size;
  overflow: hidden;
  background-color: var(--global-background);
}

.head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--spacing-2) var(--spacing-4) var(--spacing-2) var(--spacing-4);
  border-bottom: 1px solid var(--global-border);
}

.contentWrapper {
  display: flex;
  flex: 1;
  justify-content: center;
  width: 100%;
  padding-right: var(--spacing-4);
  overflow-y: auto;
}

.copyButton {
  margin-left: auto;
}

.mobileToC {
  display: block;
}

@container artifact (min-width: 768px) {
  .mobileToC {
    display: none;
  }
}

.desktopToc {
  display: none;
}

@container artifact (min-width: 768px) {
  .desktopToc {
    position: sticky;
    top: 64px;
    display: block;
  }
}

.bodyWrapper {
  flex: 1;
}

.body {
  width: 100%;
  padding: var(--spacing-6) var(--spacing-8);
  font-family: var(--main-font);
  font-size: var(--font-size-5);
  font-weight: 400;
  line-height: 1.75;
  color: var(--global-body-text);
  word-break: break-word;
  word-wrap: break-word;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Exclude code blocks from text wrapping */
.body :global(pre),
.body :global(pre code),
.body :global(pre > div) {
  word-break: normal !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
  white-space: pre !important;
}

/* Additional rule for code blocks using syntax highlighter */
.body :global([class*='language-']) {
  word-break: normal !important;
  word-wrap: normal !important;
  overflow-wrap: normal !important;
}

/* Global header styles */
.body :global(h1),
.body :global(h2),
.body :global(h3),
.body :global(h4),
.body :global(h5),
.body :global(h6) {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.25;
  color: var(--global-foreground);
}

/* First element spacing adjustments */
.body :global(*:first-child) {
  margin-top: 0;
}

/* Business Requirement (h1) */
.body :global(h1) {
  padding-bottom: var(--spacing-3);
  margin: var(--spacing-10) 0 var(--spacing-6) 0;
  font-size: var(--font-size-10);
  font-weight: 700;
  line-height: 1.3;
  color: var(--global-foreground);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--global-border);
}

/* Requirements, Functional Requirements (h2) */
.body :global(h2) {
  padding-bottom: var(--spacing-2);
  margin: var(--spacing-10) 0 var(--spacing-4) 0;
  font-size: var(--font-size-9);
  font-weight: 700;
  line-height: 1.75rem;
  color: var(--global-foreground);
  letter-spacing: -0.015em;
}

/* Requirements Categories (h3) */
.body :global(h3) {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: var(--font-size-8);
  font-weight: 600;
  line-height: 1.65;
  color: var(--global-foreground);
  letter-spacing: -0.01em;
}

/* Individual Requirements (h4) */
.body :global(h4) {
  margin-top: 1.2em;
  margin-bottom: 0.4em;
  font-size: var(--font-size-7);
  font-weight: 600;
  line-height: 1.6;
  color: var(--global-foreground);
}

/* Test Cases (h5) */
.body :global(h5) {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: var(--font-size-6);
  font-weight: 600;
  line-height: 1.5;
  color: var(--global-foreground);
}

/* DML Operations (h6) */
.body :global(h6) {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: var(--font-size-5);
  font-weight: 600;
  line-height: 1.4;
  color: var(--global-foreground);
}

/* Paragraphs */
.body :global(p) {
  margin: 0 0 var(--spacing-4) 0;
  line-height: 1.75;
}

/* Lists */
.body :global(ul),
.body :global(ol) {
  padding-left: var(--spacing-6);
  margin: var(--spacing-4) 0;
  line-height: 1.75;
}

.body :global(ul) {
  list-style-type: disc;
}

.body :global(ol) {
  list-style-type: decimal;
}

.body :global(ul ul),
.body :global(ol ul) {
  list-style-type: circle;
}

.body :global(ol ol),
.body :global(ul ol) {
  list-style-type: lower-roman;
}

.body :global(ul ul ul),
.body :global(ul ul ol),
.body :global(ul ol ul),
.body :global(ul ol ol),
.body :global(ol ul ul),
.body :global(ol ul ol),
.body :global(ol ol ul),
.body :global(ol ol ol) {
  list-style-type: lower-alpha;
}

.body :global(li) {
  margin-bottom: var(--spacing-2);
}

.body :global(li:last-child) {
  margin-bottom: 0;
}

/* Code */
.body :global(code),
.body :global(tt) {
  padding: 0.2em 0.4em;
  margin: 0;
  font-family: var(--code-font);
  font-size: var(--font-size-5);
  white-space: break-spaces;
}

.body :global(pre) {
  margin-top: 0;
  margin-bottom: var(--spacing-2);
  font-family: var(--code-font);
  font-size: var(--font-size-3);
  word-wrap: normal;
}

.body :global(pre code),
.body :global(pre tt) {
  display: inline;
  padding: 0;
  margin: 0;
  overflow: visible;
  font-size: var(--font-size-6);
  line-height: inherit;
  word-wrap: normal;
  background-color: transparent;
  border: 0;
}

/* Tables */
.body :global(table) {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-top: 0;
  margin-bottom: var(--spacing-2);
  overflow: auto;
  border-spacing: 0;
  border-collapse: collapse;
}

.body :global(table th),
.body :global(table td) {
  padding: 6px 13px;
  border: 1px solid var(--global-border);
}

.body :global(table th) {
  font-weight: 600;
}

.body :global(table tr) {
  background-color: var(--global-background);
}

/* Blockquotes */
.body :global(blockquote) {
  padding: 0 1em;
  margin: 0 0 var(--spacing-2) 0;
  border-left: 0.25em solid var(--global-border);
}

.body :global(blockquote > :first-child) {
  margin-top: 0;
}

.body :global(blockquote > :last-child) {
  margin-bottom: 0;
}

/* Horizontal Rules */
.body :global(hr) {
  height: 1px;
  padding: 0;
  margin: 24px 0;
  background-color: var(--global-border);
  border: 0;
}

/* Images */
.body :global(img) {
  box-sizing: content-box;
  max-width: 100%;
  height: auto;
  background-color: var(--global-background);
}

.body :global(img[align='right']) {
  padding-left: 20px;
}

.body :global(img[align='left']) {
  padding-right: 20px;
}

/* Links */
.body :global(a) {
  color: var(--primary-accent);
  text-decoration: none;
}

.body :global(a:hover) {
  text-decoration: underline;
}

/* Input checkbox */
.body :global(input[type='checkbox']) {
  margin: 0 0.2em 0.25em -1.4em;
  vertical-align: middle;
}

/* Keyboard */
.body :global(kbd) {
  display: inline-block;
  padding: 3px 5px;
  font-family: var(--code-font);
  font-size: var(--font-size-2);
  line-height: 10px;
  vertical-align: middle;
  color: var(--global-foreground);
  border: 1px solid var(--global-border);
  box-shadow: inset 0 -1px 0 var(--global-border);
}

/* Definition Lists */
.body :global(dl) {
  padding: 0;
  margin-top: 0;
  margin-bottom: var(--spacing-2);
}

.body :global(dl dt) {
  padding: 0;
  margin-top: var(--spacing-2);
  font-size: var(--font-size-6);
  font-style: italic;
  font-weight: 600;
}

.body :global(dl dd) {
  padding: 0 var(--spacing-2);
  margin-bottom: var(--spacing-2);
  margin-left: 0;
}

/* Superscript and Subscript */
.body :global(sup),
.body :global(sub) {
  position: relative;
  font-size: var(--font-size-3);
  line-height: 0;
  vertical-align: baseline;
}

.body :global(sup) {
  top: -0.5em;
}

.body :global(sub) {
  bottom: -0.25em;
}

/* Task lists */
.body :global(.task-list-item) {
  position: relative;
  padding-left: 1.5em;
  list-style-type: none;
}

.body :global(.task-list-item input[type='checkbox']) {
  margin: 0 0.2em 0.25em -1.5em;
  vertical-align: middle;
}

/* Mark */
.body :global(mark) {
  padding: 0.2em 0;
  color: var(--global-foreground);
  background-color: #fff8c5;
}

/* Abbreviation */
.body :global(abbr) {
  text-decoration: underline dotted;
  cursor: help;
}

.body :global(abbr[title]) {
  text-decoration: underline dotted;
  border-bottom: none;
}

/* Details and Summary */
.body :global(details) {
  display: block;
  margin-bottom: var(--spacing-2);
}

.body :global(summary) {
  display: list-item;
  margin-bottom: var(--spacing-1);
  font-weight: 600;
  cursor: pointer;
}

.body :global(details[open] summary) {
  margin-bottom: var(--spacing-2);
  border-bottom: 1px solid var(--global-border);
}

/* Section spacing */
.body :global(section + section) {
  margin-top: 32px;
}

/* Use Case titles styling */
.body :global(ol > li > strong:first-child) {
  font-weight: 600;
  color: var(--global-foreground);
}

/* DML Operations list styling */
.body :global(ul ul) {
  margin-top: 8px;
}

/* Execution Logs section */
.body :global(ul ul li) {
  font-family: var(--code-font);
  font-size: var(--font-size-3);
}

/* Execution log styling */
.executionLogTimestamp {
  flex-shrink: 0;
  margin-left: auto;
  font-family: var(--code-font);
  font-size: var(--font-size-2);
  color: var(--global-mute-text);
  white-space: nowrap;
}

.body .executionLogSuccess {
  font-family: var(--code-font);
  font-size: var(--font-size-3);
  color: var(--severity-positive-100) !important;
}

.body .executionLogFailed {
  font-family: var(--code-font);
  font-size: var(--font-size-3);
  color: var(--danger-high-contrast-text) !important;
}

/* Execution Logs heading styling */
.executionLogsHeading {
  padding-left: var(--spacing-1) !important;
  margin-top: var(--spacing-6) !important;
  margin-bottom: 0 !important;
  font-size: var(--font-size-4);
}

/* Requirements section */
.body :global(h3) {
  position: relative;
}

/* DML Operations list */
.body :global(.dml-operations-list) {
  padding-left: var(--spacing-6);
  margin: var(--spacing-2) 0;
}

/* DML Operation item styling */
.body :global(.dml-operation-item) {
  margin-bottom: var(--spacing-4);
}

.body :global(.dml-operation-item strong) {
  font-size: var(--font-size-4);
  color: var(--global-foreground);
}

/* Execution Logs label styling */
.body :global(.execution-logs-label) {
  display: block;
  font-size: var(--font-size-4);
}

/* Execution Logs list */
.body :global(.execution-logs-list) {
  padding-left: 0;
  margin: 0;
  list-style: none;
}

/* Override padding for execution logs ul - target ul containing executionLogItem */
.body ul:has(.executionLogItem) {
  padding-bottom: var(--spacing-5);
  padding-left: var(--spacing-1) !important;
  list-style: none !important;
}

/* Execution Logs list items */
.executionLogItem {
  display: flex;
  gap: var(--spacing-4);
  align-items: flex-start;
  justify-content: space-between;
  padding-left: 0;
  margin: 0;
  list-style: none;
}
